package com.zdzx.controller.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(tags = "fileauth")
@RestController()
@RequestMapping("/web")
public class WebFileController {

	

	@ApiOperation(value = "验证文件", notes = "")
	@GetMapping("/authFile")
	public void authFile(HttpServletRequest httpRequest,HttpServletResponse httpResponse) {
		httpResponse.setHeader("Content-Disposition",
				  "attachment; filename=\""+11+"\"");
				httpResponse.setHeader("Content-Type",
				  "application/octet-stream");
				httpResponse.setHeader("X-Accel-Redirect",
				  "http://127.0.0.1:9000/resouce/static/1235567854734015774024021917.jpg");
				
	}

	
}
